<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
  <database name="default" defaultIdMethod="none">
    <table name="PA_REPORTCOLUMN">
      <column name="PA_REPORTCOLUMN_ID" primaryKey="true" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="CREATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="UPDATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="PA_REPORTCOLUMNSET_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="NAME" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="SEQNO" primaryKey="false" required="true" type="DECIMAL" size="10" autoIncrement="false"/>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="ISPRINTED" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="POSTINGTYPE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
      <column name="GL_BUDGET_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="COLUMNTYPE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
      <column name="RELATIVEPERIOD" primaryKey="false" required="false" type="DECIMAL" size="10" autoIncrement="false"/>
      <column name="CURRENCYTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="CALCULATIONTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="AMOUNTTYPE" primaryKey="false" required="false" type="CHAR" size="2" autoIncrement="false"/>
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ISADHOCCONVERSION" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="OPER_1_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="OPER_2_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ELEMENTTYPE" primaryKey="false" required="false" type="CHAR" size="2" autoIncrement="false"/>
      <column name="ORG_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_ELEMENTVALUE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_LOCATION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_SALESREGION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <foreign-key foreignTable="AD_ORG" name="ADORG_PAREPORTCOLUMN" onDelete="none">
        <reference local="ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_ELEMENTVALUE_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_SALESREGION" name="CSALESREGION_PAREPORTCOLUMN" onDelete="none">
        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_BUDGET" name="GLBUDGET_PAREPORTCOLUMN" onDelete="none">
        <reference local="GL_BUDGET_ID" foreign="GL_BUDGET_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_PAREPORTCOLUMN" onDelete="none">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="PA_REPORTCOLUMN" name="PAREPORTCOLUMN_OPER1" onDelete="setnull">
        <reference local="OPER_1_ID" foreign="PA_REPORTCOLUMN_ID"/>
      </foreign-key>
      <foreign-key foreignTable="PA_REPORTCOLUMN" name="PAREPORTCOLUMN_OPER2" onDelete="setnull">
        <reference local="OPER_2_ID" foreign="PA_REPORTCOLUMN_ID"/>
      </foreign-key>
      <foreign-key foreignTable="PA_REPORTCOLUMNSET" name="PAREPORTCOLUMNSET_COLUMN" onDelete="cascade">
        <reference local="PA_REPORTCOLUMNSET_ID" foreign="PA_REPORTCOLUMNSET_ID"/>
      </foreign-key>
      <check>
        <rule><![CDATA[IsActive in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[IsPrinted in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[IsAdHocConversion in ('Y','N')]]></rule>
      </check>
    </table>
  </database>
